Installation#

Installing for Python Scripts (using a virtual environment)#

If you want to import internetarchive in your Python scripts (for programmatic access), the recommended approach is to use a virtual environment:

python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install internetarchive

After this, you can use the library in Python:

from internetarchive import get_item

item = get_item("nasa")
print(item.metadata)

Using ia Binaries#

The easiest way to start using ia is downloading a binary. The only requirements of the binary are a Unix-like environment with Python installed. To download the latest binary, and make it executable simply run the following commands:

curl -LOs https://archive.org/download/ia-pex/ia
chmod +x ia

Binaries are generated with PEX. The only requirement for using the binaries is that you have a supported version of Python installed on a Unix-like operating system.

For more details on the command-line interface please refer to the README, or run ia help.

Updating#

The method for updating depends on how you originally installed:

If you installed ia with pipx (CLI):

pipx upgrade internetarchive
If you installed internetarchive in a virtual environment (Python library):

Activate your virtual environment, then:

pip install --upgrade internetarchive
If you are using the binary:

Simply download the latest binary again with the same steps as above:

curl -LOs https://archive.org/download/ia-pex/ia
chmod +x ia

For more information about recent changes, see Updates.